<html lang="zh-CN">

<head>
    {% load bootstrap4 %}
    {% bootstrap_css %}
    {% bootstrap_javascript %}
    <title>自动化测试平台</title>
</head>

<body role="document">
<!--导航栏-->
<nav class="navbar navbar-expand-sm bg-dark navbar-dark fixed-top">
    <div class="container">
        <div class="navbar-header">
            <a class="navbar-header" href="#">自动化测试平台</a>
        </div>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <div id="navbar" class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li class="active">
                    <a href="#">流程接口测试</a>
                </li>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <li>
                    <a href="#">流程接口测试步骤</a>
                </li>
            </ul>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <ul class="nav justify-content-end" style="position:absolute; right:10px; bottom:0; ">
                <li class="nav-link"><a style='color:white' href="#">{{user}}</a></li>
                <li class="nav-link"><a style='color:white' href="/logout/">退出</a></li>
            </ul>
        </div>
    </div>
</nav>

<!--流程接口测试步骤-->
<div class="row" style="padding-top: 50px;">
    <div class="col-md-11">
        <table class="table table-striped">
            <thead>

            <tr>
                <th>所属产品</th>
                <th>所属用例</th>
                <th>步骤</th>
                <th>URL地址ַ</th>
                <th>参数=值</th>
                <th>方法</th>
                <th>预期结果</th>
                <th>测试结果</th>
                <th>执行时间</th>
            </tr>
            </thead>
            <tbody>
            {% for apistep in apisteps %}
            <tr>
                {% if apistep.Apitest.id == apitest.id %}
                <td>{{ apistep.Apitest.Product.productname }}</td>
                <td>case_{{ apistep.Apitest.id }}_{{ apistep.Apitest.apitestname }}</td>
                <td>{{ apistep.apistep }}:{{ apistep.apiname }}</td>
                <td>{{ apistep.apiurl }}</td>
                <td>{{ apistep.apiparamvalue }}</td>
                <td>{{ apistep.apimethod }}</td>
                <td>{{ apistep.apiresult }}</td>
                <td>{% if apistep.apistatus == 1 %}
                    <a style='color:green'>{{ apistep.apistatus }}</a>
                    {% else %}
                    <a style='color:red'>{{ apistep.apistatus }}</a>
                    {% endif %}
                </td>
                <td>{{ apistep.create_time }}</td>
                {% else %}
                {% endif %}
            </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>
</div>

</body>
</html>